package com.example.a1;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {
    private ImageButton button;
    private  button btn2;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        button = findViewById(R.layout.activity_main);
    }

    public void click(View view) {
        Toast.makeText(this,"按钮点击",Toast.LENGTH_SHORT).show();
    }



    @Override
    public void onClick(View view) {
        Toast.makeText(this,"按钮点击",Toast.LENGTH_SHORT).show();
    }
}